<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ include file="/common/include/dictNames.jsp"%>
<%@ page
	import="com.kylin.module.shop.orm.*,com.kylin.common.util.*,com.kylin.common.dict.orm.Dict,com.kylin.common.paginate.DisplayPage,com.kylin.module.user.orm.*"%>

<table class="tl05" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td class="prod" valign="top" memo="------列表所在格-------">

			<table class="navi" width="100%" cellspacing="0" cellpadding="0">
				<tr>
					<td>
						| <bean:message key="company.01"/> |
						<%
							if (request.getAttribute("searchCatProduct") != null) {
							out.print(" - | ");
							Dict cat = (Dict) request.getAttribute("searchCatProduct");
							if (cat.getParent() != null) {
								StringBuffer navStr = new StringBuffer("| <a href=");
								navStr.append("'/module/shop/shop.do?CMD=shopList");
								navStr.append("&parentCat=")
								.append(cat.getParent().getId());
								navStr.append("'>").append(cat.getParent().getName())
								.append("</a> | - | ");
								out.print(navStr);
							}
							out.print(cat.getName());
						}
					%>
					</td>
				</tr>
			</table>
			<mytag:MyActionMsg />
			<div style="text-align:center;"><script type="text/javascript"><!--
google_ad_client = "pub-6007578250513537";
/* 468x60, 创建于 08-5-13 */
google_ad_slot = "5206242207";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

			<table class="prodt02" cellspacing="0" cellpadding="0">
				<tr>
					<td class="tl05pl"></td>
					<td class="tl05pm">
						<table width="100%" cellspacing="0" cellpadding="0">
							<tr>
								<td width="80" align="center">
							&nbsp;
								</td>
								<td width="160" align="center">
									<bean:message key="company.02"/>
								</td>
								<td align="center">
									<bean:message key="company.03"/>
								</td>
							</tr>
						</table>
					</td>
					<td class="tl05pr"></td>
				</tr>
			</table>
			<table class="prodt03" cellspacing="0" cellpadding="0">
				<tr>
					<td></td>
				</tr>
			</table>


			<%
				DisplayPage dispage = null;
				String ownUrl = "";
				if (request.getAttribute(Constants.KEY_REQUEST_RESULT) instanceof DisplayPage) {
					dispage = (DisplayPage) request
					.getAttribute(Constants.KEY_REQUEST_RESULT);
					out.println("<input type='hidden' name='searchId' value='"
					+ dispage.getSearchId() + "' />");
					out.println("<input type='hidden' name='page' value='"
					+ dispage.getPageNumber() + "' />");
					ownUrl = "/module/shop/shop.do?CMD=companyList&searchId="
					+ dispage.getSearchId();

					for (int i = 0; i < dispage.getList().size(); i++) {
						Company obj = (Company) dispage.getList().get(i);
						String country = obj.getUser().getCountry();
			%>

			<table cellpadding="0" cellspacing="0" class="seller01">

				<tr class="seller03">
					<td class="sellerc">
						<a
							href="/module/shop/shop.do?CMD=companyList&country=<%=obj.getUser().getCountry()%>">
							<%=UTool.getCountryName(obj.getUser().getCountry(),
									sessionLocale)%>
						</a>
					</td>
					<td class="sellerl">
			<img src="/fileOutServlet?imgType=<%=Constants.IMG_COMPANYLOGO%>&imgurl=<%=obj.getLogo()%>" width="80" height="60" title="<bean:message key="company.listlogo"/>">
					</td>
					<td class="sellercr">
						<img src="/images/arrowy.gif" width="11" height="11"
							align="absmiddle">
						<a
							href="/module/shop/company/shop.do?CMD=companyShopList&companyId=<%=obj.getId()%>"
							target="_blank"> <%=obj.getName()%> </a>
						<br>
		&nbsp;&nbsp;<!-- 主营类别 --><bean:message key="regcompany.06" />：&nbsp;
        <%
        Set catp = obj.getMaincatproduct();
	    CompanyCat[] cats = (CompanyCat[])catp.toArray(new CompanyCat[0]);
	    for(int j=0;j<cats.length;j++){
	       out.println(cats[j].getCatproduct() );
	    }
	    %><br>
						&nbsp;
						<%=JspHelper.substring((obj.getCompanyIntro() == null) ? "" : obj
							.getCompanyIntro(),240,"...")%>
					</td>
				</tr>
				<!-- tr class="seller03">
        <td colspan="3" class="sellercr">
		所属主营行业：<a href="companylist.htm" target="_blank">进出口</a><br>
          发布出售信息：<a href="shopsellerslist.htm" target="_blank">3条贸易信息</a>&nbsp;&nbsp;&nbsp;&nbsp;发布收购信息：<a href="shopsellerslist.htm">1条贸易信息</a><br>
          发布产品数量：<a href="shop01detail.htm" target="_blank">18</a>
		</td>
        </tr -->
			</table>
			<%
				}
				}
			%>

			<%=JspHelper.getPageBar(dispage, ownUrl)%>

		</td>
		<td class="tl05r" valign="top" memo="右边表格">
			<c:import url="/module/special/manageSpecial.do?CMD=listGlobalRight" />
		</td>
		<!-- 右边表格所在格结束  -->
	</tr>
</table>
<table class="prodt04" cellspacing="0" cellpadding="0" align="center"
	memo="下方查询条">
	<tr>
		<td>
			<form name="shopSearchBarForm" action="" method="post">
				<input type="hidden" name="parentCat">
				<input class="input01" name="name" type="text" size="26" />
				<select name="searchType" class="input01">
					<option value="product">
						<bean:message key="company.81"/>
					</option>
					<option value="seller">
						<bean:message key="company.78"/>
					</option>
					<option value="buy">
						<bean:message key="company.79"/>
					</option>
					<option value="company">
						<bean:message key="company.94"/>
					</option>
				</select>
				<%
					//构造 产品类别下拉菜单(一二两级)
					List maincatproduct = MemObjFactory.getDict("产品类别", sessionLocale
							.toString());
					boolean disableSelectParent = false;
					out.println(JspHelper.getCatProductSelect(maincatproduct,
							"catproduct", disableSelectParent));
				%>

				<mytag:national name="country" dictName="<%=Constants.ALLCOUNTRY%>" />
				<input type="button" onclick="search(document.shopSearchBarForm)"
					value="search" class="input01" />
		</td>
		</form>
		</td>
	</tr>
</table>



